/* MattPaint - Main Styles (Windows 10 Paint Clone) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --win-bg: #F0F0F0;
    --win-ribbon-bg: #F5F6F7;
    --win-border: #D6D6D6;
    --win-border-dark: #ADADAD;
    --win-accent: #0078D4;
    --win-accent-hover: #106EBE;
    --win-accent-light: #E5F1FB;
    --win-text: #1A1A1A;
    --win-text-secondary: #666666;
    --win-text-disabled: #A0A0A0;
    --win-hover: #E5E5E5;
    --win-selected: #CCE8FF;
    --win-selected-border: #99D1FF;
    --win-canvas-bg: #808080;
    --win-white: #FFFFFF;
    --win-titlebar: #FFFFFF;
    --win-shadow: rgba(0, 0, 0, 0.15);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: var(--win-text);
    background: var(--win-bg);
    user-select: none;
    -webkit-user-select: none;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--win-bg);
}

/* Title Bar - Windows 10 Style */
#title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 32px;
    background: var(--win-titlebar);
    border-bottom: 1px solid var(--win-border);
    padding: 0;
    -webkit-app-region: drag;
}

.title-left {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
    padding-left: 4px;
}

.title-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--win-text);
    pointer-events: none;
}

.title-right {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Window Control Buttons */
.window-controls {
    display: flex;
    height: 100%;
}

.window-btn {
    width: 46px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-app-region: no-drag;
    transition: background-color 0.1s;
}

.window-btn svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: #333;
    stroke-width: 1;
}

.window-btn:hover {
    background: var(--win-hover);
}

.window-btn.close:hover {
    background: #E81123;
}

.window-btn.close:hover svg {
    stroke: white;
}

/* File Button - Blue Tab Style */
.file-btn {
    background: var(--win-accent);
    color: white;
    border: none;
    padding: 6px 20px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    -webkit-app-region: no-drag;
    transition: background-color 0.1s;
}

.file-btn:hover {
    background: var(--win-accent-hover);
}

.file-btn:active {
    background: #005A9E;
}

.title-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 100%;
    cursor: pointer;
    font-size: 16px;
    color: var(--win-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-app-region: no-drag;
}

.title-btn:hover {
    background: var(--win-hover);
}

/* Quick Access Toolbar */
#quick-access {
    position: absolute;
    left: 90px;
    top: 0;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 0 4px;
}

.qat-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: background-color 0.1s;
}

.qat-btn:hover {
    background: var(--win-hover);
}

.qat-btn:active {
    background: var(--win-selected);
}

.qat-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.qat-btn:disabled:hover {
    background: transparent;
}

.qat-btn svg {
    width: 14px;
    height: 14px;
    fill: var(--win-text-secondary);
}

/* Main Content */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--win-canvas-bg);
    overflow: hidden;
    position: relative;
}

/* Rulers */
.ruler {
    background: var(--win-white);
    position: absolute;
    z-index: 10;
}

#ruler-horizontal {
    left: 25px;
    top: 0;
    right: 0;
    height: 25px;
    border-bottom: 1px solid var(--win-border);
}

#ruler-vertical {
    left: 0;
    top: 25px;
    width: 25px;
    bottom: 0;
    border-right: 1px solid var(--win-border);
}

#ruler-h-canvas {
    width: 100%;
    height: 24px;
}

#ruler-v-canvas {
    width: 24px;
    height: 100%;
}

/* Canvas Container */
#canvas-container {
    flex: 1;
    overflow: auto;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
}

#canvas-wrapper {
    position: relative;
    background: var(--win-white);
    box-shadow: 1px 1px 4px var(--win-shadow),
                2px 2px 8px var(--win-shadow);
    cursor: inherit;
}

#main-canvas {
    display: block;
    background: white;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Tool cursors - with contrasting outline for visibility on any background */
#main-canvas.cursor-pencil { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 000-1.41l-2.34-2.34a1 1 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" fill="%23FFF" stroke="%23000" stroke-width="1"/></svg>') 0 24, crosshair; }
#main-canvas.cursor-brush { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><circle cx="12" cy="12" r="9" fill="none" stroke="%23FFF" stroke-width="2"/><circle cx="12" cy="12" r="8" fill="none" stroke="%23000" stroke-width="1"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-eraser { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><rect x="5" y="5" width="14" height="14" fill="%23FFF" stroke="%23000" stroke-width="2"/><line x1="5" y1="12" x2="19" y2="12" stroke="%23F88" stroke-width="2"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-fill { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M19 11s-2 2.5-2 4a2 2 0 004 0c0-1.5-2-4-2-4z" fill="%2300F" stroke="%23FFF" stroke-width="1"/><path d="M5 14L3 16v5h4l2-2-4-5zm11-9l-1-1a1 1 0 00-1.5 0L3 14l5 5 10-10a1 1 0 000-1.5L16 5z" fill="%23FFC107" stroke="%23000" stroke-width="1"/></svg>') 2 22, crosshair; }
#main-canvas.cursor-picker { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M20 4l-2-2-3 3-1-1-2 2 1 1-10 10v4h4l10-10 1 1 2-2-1-1 3-3-2-2zM10 19H7v-3l10-10 3 3-10 10z" fill="%23FFF" stroke="%23000" stroke-width="1"/></svg>') 0 24, crosshair; }
#main-canvas.cursor-text { cursor: text; }
#main-canvas.cursor-move { cursor: move; }
#main-canvas.cursor-crosshair { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><line x1="12" y1="0" x2="12" y2="24" stroke="%23FFF" stroke-width="3"/><line x1="0" y1="12" x2="24" y2="12" stroke="%23FFF" stroke-width="3"/><line x1="12" y1="0" x2="12" y2="24" stroke="%23000" stroke-width="1"/><line x1="0" y1="12" x2="24" y2="12" stroke="%23000" stroke-width="1"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-zoom-in { cursor: zoom-in; }
#main-canvas.cursor-zoom-out { cursor: zoom-out; }

/* Brush type specific cursors - with contrasting outline */
#main-canvas.cursor-brush-brush { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><circle cx="12" cy="12" r="9" fill="none" stroke="%23FFF" stroke-width="2"/><circle cx="12" cy="12" r="8" fill="none" stroke="%23000" stroke-width="1"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-brush-calligraphy1 { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><ellipse cx="12" cy="12" rx="3" ry="10" fill="none" stroke="%23FFF" stroke-width="2" transform="rotate(-45 12 12)"/><ellipse cx="12" cy="12" rx="2" ry="9" fill="none" stroke="%23000" stroke-width="1" transform="rotate(-45 12 12)"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-brush-calligraphy2 { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><ellipse cx="12" cy="12" rx="3" ry="10" fill="none" stroke="%23FFF" stroke-width="2" transform="rotate(45 12 12)"/><ellipse cx="12" cy="12" rx="2" ry="9" fill="none" stroke="%23000" stroke-width="1" transform="rotate(45 12 12)"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-brush-airbrush { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><circle cx="12" cy="12" r="10" fill="none" stroke="%23FFF" stroke-width="2" stroke-dasharray="2 2"/><circle cx="12" cy="12" r="5" fill="none" stroke="%23000" stroke-width="1"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-brush-oil { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><rect x="3" y="8" width="18" height="8" fill="none" stroke="%23FFF" stroke-width="2" rx="1"/><rect x="4" y="9" width="16" height="6" fill="none" stroke="%23000" stroke-width="1" rx="1"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-brush-crayon { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M6 5 L18 5 L15 19 L9 19 Z" fill="none" stroke="%23FFF" stroke-width="2"/><path d="M7 6 L17 6 L14 18 L10 18 Z" fill="none" stroke="%23000" stroke-width="1"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-brush-marker { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><rect x="7" y="3" width="10" height="18" fill="none" stroke="%23FFF" stroke-width="2"/><rect x="8" y="4" width="8" height="16" fill="none" stroke="%23000" stroke-width="1"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-brush-pencil { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><line x1="5" y1="19" x2="19" y2="5" stroke="%23FFF" stroke-width="4" stroke-linecap="round"/><line x1="5" y1="19" x2="19" y2="5" stroke="%23000" stroke-width="2" stroke-linecap="round"/></svg>') 12 12, crosshair; }
#main-canvas.cursor-brush-watercolor { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><circle cx="12" cy="12" r="10" fill="none" stroke="%23FFF" stroke-width="2" opacity="0.8"/><circle cx="12" cy="12" r="8" fill="none" stroke="%23000" stroke-width="1" stroke-dasharray="3 2"/></svg>') 12 12, crosshair; }

#preview-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

#selection-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Canvas Resize Handles */
.resize-handle {
    position: absolute;
    background: var(--win-white);
    border: 1px solid var(--win-border-dark);
}

.resize-handle.right {
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 16px;
    cursor: e-resize;
}

.resize-handle.bottom {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 6px;
    cursor: s-resize;
}

.resize-handle.corner {
    right: -8px;
    bottom: -8px;
    width: 8px;
    height: 8px;
    cursor: se-resize;
}

.resize-handle:hover {
    background: var(--win-selected);
    border-color: var(--win-accent);
}

/* Status Bar - Windows 10 Style */
#status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 26px;
    background: var(--win-ribbon-bg);
    border-top: 1px solid var(--win-border);
    padding: 0 12px;
    font-size: 11px;
    color: var(--win-text-secondary);
}

.status-left, .status-center, .status-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-left {
    min-width: 200px;
}

.status-center {
    flex: 1;
    justify-content: center;
}

.status-right {
    gap: 6px;
    min-width: 200px;
    justify-content: flex-end;
}

.status-separator {
    width: 1px;
    height: 16px;
    background: var(--win-border);
    margin: 0 8px;
}

.status-zoom-btn {
    width: 22px;
    height: 20px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    border-radius: 2px;
    color: var(--win-text-secondary);
}

.status-zoom-btn:hover {
    background: var(--win-hover);
    border-color: var(--win-border);
}

#status-zoom-slider {
    width: 120px;
    cursor: pointer;
    accent-color: var(--win-accent);
}

#status-zoom-level {
    min-width: 45px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Dropdown Menus - positioned below ribbon */
.dropdown-menu {
    position: fixed;
    background: var(--win-white);
    border: 1px solid var(--win-border-dark);
    box-shadow: 0 4px 12px var(--win-shadow);
    z-index: 9999;
    min-width: 180px;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-menu.hidden {
    display: none !important;
}

.menu-section {
    padding: 4px 0;
}

.menu-separator {
    height: 1px;
    background: var(--win-border);
    margin: 4px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 6px 16px 6px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
    color: var(--win-text);
    gap: 10px;
    position: relative;
    transition: background-color 0.1s;
}

.menu-item:hover {
    background: var(--win-selected);
}

.menu-item.active {
    background: var(--win-accent-light);
}

.menu-item.active::before {
    content: '✓';
    position: absolute;
    left: 6px;
    font-size: 11px;
    color: var(--win-accent);
    font-weight: bold;
}

.menu-item:disabled {
    color: var(--win-text-disabled);
    cursor: default;
}

.menu-item:disabled:hover {
    background: transparent;
}

.menu-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--win-text-secondary);
}

.menu-text {
    flex: 1;
}

.menu-shortcut {
    color: var(--win-text-secondary);
    font-size: 11px;
    margin-left: auto;
}

.menu-item.checkbox {
    gap: 6px;
}

.menu-item.checkbox input {
    margin-right: 4px;
    accent-color: var(--win-accent);
}

/* Brushes Dropdown */
.brushes-grid {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    gap: 4px;
    padding: 8px;
}

.brush-btn {
    width: 44px;
    height: 44px;
    background: var(--win-white);
    border: 1px solid var(--win-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.1s;
}

.brush-btn:hover {
    background: var(--win-selected);
    border-color: var(--win-selected-border);
}

.brush-btn.active {
    background: var(--win-selected);
    border-color: var(--win-accent);
    box-shadow: inset 0 0 0 1px var(--win-accent);
}

.brush-btn svg {
    width: 26px;
    height: 26px;
}

/* Size Dropdown */
.size-options {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
}

.size-option {
    width: 80px;
    height: 28px;
    background: var(--win-white);
    border: 1px solid var(--win-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.1s;
}

.size-option:hover {
    background: var(--win-selected);
    border-color: var(--win-selected-border);
}

.size-option.active {
    background: var(--win-selected);
    border-color: var(--win-accent);
}

.size-option svg {
    width: 70px;
    height: 22px;
}

/* Text Options in Ribbon */
.text-options-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
}

.text-font-select {
    width: 140px;
    height: 26px;
    font-size: 12px;
    border: 1px solid var(--win-border);
    border-radius: 3px;
    padding: 0 8px;
    background: var(--win-white);
}

.text-font-select:focus {
    border-color: var(--win-accent);
    outline: none;
}

.text-size-select {
    width: 55px;
    height: 26px;
    font-size: 12px;
    border: 1px solid var(--win-border);
    border-radius: 3px;
    padding: 0 4px;
    background: var(--win-white);
}

.text-size-select:focus {
    border-color: var(--win-accent);
    outline: none;
}

.text-style-buttons {
    display: flex;
    gap: 2px;
    border: 1px solid var(--win-border);
    border-radius: 3px;
    padding: 2px;
    background: var(--win-white);
}

.text-style-btn {
    width: 28px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
}

.text-style-btn:hover {
    background: var(--win-hover);
}

.text-style-btn.active {
    background: var(--win-selected);
}

/* Text Input - appears directly on canvas */
#text-input {
    position: fixed;
    background: transparent;
    border: 1px dashed var(--win-accent);
    outline: none;
    resize: none;
    font-size: 14px;
    font-family: Arial, sans-serif;
    padding: 2px;
    min-width: 20px;
    min-height: 20px;
    z-index: 100;
    overflow: hidden;
    color: #000;
    caret-color: #000;
}

#text-input.hidden {
    display: none;
}

#text-input:focus {
    border: 1px dashed var(--win-accent);
    box-shadow: 0 0 0 1px rgba(0, 120, 212, 0.3);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Drag and drop overlay */
#canvas-container.drag-over {
    background: rgba(0, 120, 212, 0.08);
    outline: 3px dashed var(--win-accent);
    outline-offset: -3px;
}

#canvas-container.drag-over::after {
    content: 'Drop image here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 500;
    color: var(--win-accent);
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 32px;
    border-radius: 6px;
    box-shadow: 0 4px 16px var(--win-shadow);
    pointer-events: none;
}

/* Emoji Icons Styling */
.tool-emoji {
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brush-emoji {
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-emoji {
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure tool buttons properly display emojis */
.tool-btn {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.brush-btn {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.shape-btn {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--win-accent);
    outline-offset: 1px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: var(--win-ribbon-bg);
}

::-webkit-scrollbar-thumb {
    background: #C1C1C1;
    border: 3px solid var(--win-ribbon-bg);
    border-radius: 7px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A8A8A8;
}

::-webkit-scrollbar-corner {
    background: var(--win-ribbon-bg);
}


/* ---------- Phone / narrow screens ---------- */
@media (max-width: 700px) {
    .status-left {
        min-width: 0;
    }
    #ribbon {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .ribbon-content {
        padding: 6px 4px 4px 4px;
    }
    .ribbon-group {
        padding: 0 4px;
    }
    #canvas-container {
        padding: 8px;
        -webkit-overflow-scrolling: touch;
    }
    #status-bar {
        font-size: 11px;
        gap: 12px;
        padding: 0 8px;
    }
    #status-pos, #status-selection {
        display: none;
    }
    #status-zoom-slider {
        width: 70px;
    }
    .status-zoom-btn {
        width: 28px;
        height: 28px;
    }
    .ribbon-tab {
        padding: 6px 14px;
    }
}

/* Toast */
#toast {
    position: fixed;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.92);
    color: #fff;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 4px;
    z-index: 3000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ---------- Single top row (File | Home | View | save undo redo | title | ?) ---------- */
#ribbon-tabs {
    height: 32px;
    align-items: stretch;
    padding: 0;
}
#ribbon-tabs .file-btn {
    height: 100%;
    padding: 0 20px;
}
#ribbon-tabs .ribbon-tab {
    padding: 0 18px;
    margin-bottom: -1px;
}
#ribbon-tabs #quick-access {
    position: static;
    height: 100%;
    padding: 0 6px;
    border-left: 1px solid var(--win-border);
    margin-left: 4px;
}
#document-title {
    flex: 1;
    min-width: 0;
    align-self: center;
    text-align: center;
    font-size: 12px;
    color: var(--win-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}
#ribbon-tabs .title-btn {
    height: 100%;
    width: 36px;
}
#file-menu {
    top: 32px;
    left: 0;
}
@media (max-width: 700px) {
    #ribbon-tabs .file-btn { padding: 0 12px; }
    #ribbon-tabs .ribbon-tab { padding: 0 10px; }
    #ribbon-tabs #quick-access { padding: 0 2px; margin-left: 0; }
    #document-title { font-size: 11px; padding: 0 4px; }
}
