﻿/* ============================================
   Theme: "Nancy" — workshop.nancy0.com
   Part of the family design system — see DESIGN-SYSTEM.md
   Class + token names are shared across all sites.
   ============================================ */

:root {
    /* unified design tokens (shared names across all sites) */
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-display: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: Consolas, 'Courier New', monospace;

    --bg: #1a1a1a;
    --bg-2: #2d2d2d;

    --panel: #2d2d2d;
    --panel-2: #1a1a1a;

    --text: #e8e8e8;
    --text-soft: #cfcfcf;
    --text-faint: #8a8a8a;

    --accent: #b96536;
    --accent-2: #dc7d48;
    --accent-text: #ffffff;
    --accent-soft: rgba(185, 101, 54, 0.18);

    --border: rgba(139, 69, 19, 0.45);
    --border-strong: #8B4513;

    --focus-ring: rgba(185, 101, 54, 0.18);

    --danger: #ff9d9d;
    --ok: #9fd08a;

    --radius: 8px;
    --radius-lg: 14px;
}

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

form { display: contents; }

a {
    color: #b96536;
    text-decoration-line: underline;
    text-decoration-color: rgba(185, 101, 54, 0.55);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
    transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:visited { color: #a45a35; }

a:hover {
    color: #dc7d48;
    text-decoration-color: currentColor;
}

a:active { color: #e8e8e8; }

a:focus-visible {
    outline: 3px solid rgba(185, 101, 54, 0.65);
    outline-offset: 3px;
    border-radius: 3px;
}

body {
    background:
        linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            rgba(139, 69, 19, 0.03) 49px,
            rgba(139, 69, 19, 0.03) 50px
        );
    background-blend-mode: overlay;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    overflow-x: hidden;
}

.site {
    width: min(100%, 1100px);
    margin: clamp(1.5rem, 4vw, 3rem) auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    position: relative;
    z-index: 1;
    text-align: center;
    background: linear-gradient(145deg, rgba(45, 45, 45, 0.78), rgba(26, 26, 26, 0.88));
    border: 1px solid rgba(139, 69, 19, 0.45);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-media {
    display: block;
    width: min(100%, 1100px);
    margin: 0 auto 2rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.hero-media img {
    display: block;
    width: 100%;
    height: auto;
}

.logo-mark {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    border: 3px solid #8B4513;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    box-shadow:
        0 4px 20px rgba(139, 69, 19, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.logo-mark span { font-size: 2.5rem; }

.logo-mark img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 9px;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    color: #e8e8e8;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

h1 span { color: #8B4513; }

.tagline {
    font-size: 1.1rem;
    color: #8B4513;
    margin-bottom: 2.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8B4513, transparent);
    margin: 2rem auto;
    border-radius: 2px;
}

.prose,
.prose-center {
    width: min(100%, 1100px);
    margin: 0 auto 2.5rem;
    padding: 0;
    color: #cfcfcf;
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
    line-height: 1.75;
    text-align: left;
}

.prose-center { text-align: center; }

.prose p,
.prose-center p { margin: 0; }

.prose br,
.prose-center br {
    content: '';
    display: block;
    margin-bottom: 0.9rem;
}

.prose a,
.prose-center a {
    color: #a0522d;
    text-decoration-color: rgba(160, 82, 45, 0.55);
    text-underline-offset: 0.2em;
}

.prose a:hover,
.prose a:focus-visible,
.prose-center a:hover,
.prose-center a:focus-visible { color: #c66a3a; }

.prose-center h2 {
    margin-bottom: 1.25rem;
    color: #e8e8e8;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(139, 69, 19, 0.5);
    border-radius: 12px;
}

.feature-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    text-align: center;
}

.feature-table th,
.feature-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.feature-table th { border-right: 1px solid rgba(160, 82, 45, 0.55); }
.feature-table thead th:last-child { border-right: 0; }

.feature-table thead th {
    color: #e8e8e8;
    background: rgba(139, 69, 19, 0.72);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feature-table thead th:first-child,
.feature-table tbody th { text-align: left; }

.feature-table tbody th {
    color: #e8e8e8;
    font-weight: 600;
}

.feature-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.025); }
.feature-table tbody tr:last-child th,
.feature-table tbody tr:last-child td { border-bottom: 0; }
.feature-table tbody tr:hover { background: rgba(139, 69, 19, 0.12); }

@media (max-width: 600px) {
    .site { padding: 1rem; }
    .prose,
    .prose-center {
        line-height: 1.65;
    }
}

.coming-soon {
    font-size: 0.85rem;
    color: #666;
    letter-spacing: 0.5em;
    text-transform: uppercase;
}

/* ============================================
   Login / register forms
   ============================================ */

.auth-card {
    width: min(100%, 460px);
    margin: 0 auto 2.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: linear-gradient(145deg, rgba(45, 45, 45, 0.78), rgba(26, 26, 26, 0.88));
    border: 1px solid rgba(139, 69, 19, 0.45);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 0.4rem;
    color: #e8e8e8;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
}

.auth-card .login-sub {
    color: #8a8a8a;
    font-size: 0.95rem;
    margin-bottom: 1.4rem;
}

.field {
    margin-bottom: 1.1rem;
    text-align: left;
}

.field > label {
    display: block;
    color: #b96536;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.field input[type="checkbox"] + label {
    display: inline;
    color: var(--text-soft);
    font-size: 0.9rem;
    letter-spacing: normal;
    text-transform: none;
    margin: 0;
    vertical-align: middle;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    padding: 0.72rem 0.95rem;
    color: #cfcfcf;
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid rgba(139, 69, 19, 0.45);
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
    border-color: #b96536;
    box-shadow: 0 0 0 3px rgba(185, 101, 54, 0.18);
}

.field input::placeholder {
    color: #777;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 160ms ease;
}

.btn-primary {
    background: #b96536;
    color: #ffffff;
}

.btn-primary:visited {
    color: #ffffff;
}

.btn-primary:hover {
    background: #dc7d48;
    color: #ffffff;
}

.form-msg {
    display: block;
    margin-top: 0.6rem;
    color: #ff9d9d;
    font-size: 0.9rem;
}

.register-note {
    margin-top: 1.1rem;
    color: #8a8a8a;
    font-size: 0.82rem;
    line-height: 1.5;
}

.register-note a {
    color: #b96536;
}

.login-email {
    color: #cfcfcf;
    font-size: 1rem;
    font-weight: 600;
    word-break: break-all;
}

.site-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: auto;
    padding: 1rem 1rem 2rem;
    text-align: center;
    color: #444;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.garage-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.garage-lines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 120px,
        rgba(139, 69, 19, 0.04) 120px,
        rgba(139, 69, 19, 0.04) 121px
    );
}

/* ============================================
   App table (account area)
   ============================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(139, 69, 19, 0.45);
}

.data-table th {
    color: #e8e8e8;
    background: rgba(139, 69, 19, 0.72);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table td {
    color: #cfcfcf;
}

.data-table tbody tr:hover {
    background: rgba(139, 69, 19, 0.12);
}

.data-table tbody tr.row-passive:hover {
    background: transparent;
}

.check-col {
    text-align: center;
    width: 1%;
    white-space: nowrap;
}

.check-on {
    color: #b96536;
}

.verify-note {
    margin: 1.25rem auto 0;
    max-width: 560px;
    padding: 0.85rem 1.1rem;
    color: #cfcfcf;
    background: rgba(139, 69, 19, 0.14);
    border: 1px solid rgba(139, 69, 19, 0.45);
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.55;
}
.verify-note a {
    color: #dc7d48;
}

.upgrade-note {
    margin-top: 1rem;
    color: #8a8a8a;
    font-size: 0.9rem;
    text-align: center;
}
.upgrade-note a {
    color: #dc7d48;
}

.switch-note {
    margin-top: 1rem;
    color: #8a8a8a;
    font-size: 0.9rem;
    text-align: center;
}
.switch-note a {
    color: #dc7d48;
}

/* App icons */
.nav-ico {
    display: inline-block;
    vertical-align: middle;
    margin-right: 7px;
}

/* ============================================
   /Data/ app - shared class names, Nancy theme
   ============================================ */

.page {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    text-align: left;
}

.page-head { margin-bottom: 8px; }

.page-head h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.04em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.page-head h1::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 14px 0 0;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.page-head .tagline { margin-top: 10px; color: var(--text-faint); font-size: 1rem; text-transform: none; }
.page-head .folder-config { margin-top: 6px; }
.page-head .folder-config a { color: var(--accent); font-size: 0.9rem; text-decoration: none; }
.page-head .folder-config a:hover { text-decoration: underline; }
.page-head .folder-access { margin-top: 6px; color: var(--text-faint); font-size: 0.85rem; }
.conn-id { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 2px; }
.conn-name { font-size: 2.2rem; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }
.data-meta { margin-top: 6px; color: var(--text-faint); font-size: 0.9rem; }
.data-desc { margin-top: 6px; color: var(--text-faint); font-size: 0.9rem; font-style: italic; }
.friend-since { display: block; margin-top: 6px; color: var(--text-faint); font-size: 0.8rem; }
.friend-request-msg { display: block; margin: 8px 0; padding: 8px 10px; background: var(--panel-2); border-left: 3px solid var(--accent); color: var(--text-soft); font-size: 0.85rem; line-height: 1.5; }
.friend-request-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.conn-accept { color: var(--ok); font-weight: 600; }
.conn-deny { color: var(--danger); font-weight: 600; }
.conn-hint { color: var(--text-faint); font-size: 0.85rem; }
@media (max-width: 640px) { .conn-name { font-size: 1.5rem; } }

.edit-ico { font-size: 0.8em; cursor: pointer; }

.btn-secondary { background: transparent; color: var(--accent); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent-2); }

.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--text); }

.btn:disabled {
    background: var(--panel-2);
    color: var(--text-faint);
    border-color: transparent;
    cursor: not-allowed;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.form-msg { display: block; margin-top: 12px; font-size: 0.9rem; color: var(--danger); }
.form-msg-ok { color: var(--ok); }

.check-off { color: var(--danger); }

.app-link { color: var(--text); text-decoration: none; }
.app-link:hover { color: var(--accent); text-decoration: underline; }

.data-path { margin-top: 10px; color: var(--text-faint); font-size: 0.85rem; }
.data-path-value { font-weight: 600; color: var(--text-soft); }

.data-status { margin: 4px 0 0; color: var(--text-faint); font-size: 0.8rem; }

.cfg-hint { display: block; margin-top: 6px; color: var(--text-faint); font-size: 0.8rem; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.4; }

/* Inputs inside /Data/ forms (textarea + select not covered by the base theme) */
.field textarea,
.field select,
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    padding: 0.72rem 0.95rem;
    color: var(--text-soft);
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea { min-height: 140px; resize: vertical; }

.field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='8'%20viewBox='0%200%2012%208'%3E%3Cpath%20fill='%23b96536'%20d='M1.41%200L6%204.58%2010.59%200%2012%201.41%206%207.41%200%201.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.field textarea:focus,
.field select:focus,
.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.field input:disabled,
.field textarea:disabled,
.field select:disabled {
    background: var(--panel-2);
    color: var(--text-faint);
    cursor: not-allowed;
}

/* Config dropdown (bare select outside /Data/ .field) */
select {
    width: 100%;
    padding: 0.72rem 0.95rem;
    color: var(--text-soft);
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='8'%20viewBox='0%200%2012%208'%3E%3Cpath%20fill='%23b96536'%20d='M1.41%200L6%204.58%2010.59%200%2012%201.41%206%207.41%200%201.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.data-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.data-toolbar input[type="text"] {
    flex: 1 1 220px;
    min-width: 0;
    width: auto;
    padding: 0.6rem 0.9rem;
    color: var(--text-soft);
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.data-toolbar input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 640px) {
    .data-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

.data-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 80px;
    padding: 12px 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
}

.data-item-folder {
    background: #332e22;
}

.data-item-file { cursor: default; }

.data-item:hover,
.data-item:focus-visible { border-color: var(--accent); background: var(--accent-soft); }

.data-item-icon { font-size: 2rem; line-height: 1; }

.data-item-thumb { width: 100%; height: auto; border-radius: 6px; display: block; }

/* Video tiles: thumbnail + centered play badge. */
.data-item-thumb-video { position: relative; display: block; line-height: 0; }

.video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    padding-left: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Folders reserve a fixed square icon box so icon/no-icon tiles match and don't jump while images load. */
.data-item-folder .data-item-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  line-height: 1;
  overflow: hidden;
  border-radius: 6px;
}

.data-item-folder .data-item-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.data-item-name {
    max-width: 100%;
    font-size: 0.85rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-item-sub {
    max-width: 100%;
    font-size: 0.7rem;
    color: var(--text-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-search-form { display: contents; }

.data-item-actions { display: flex; gap: 6px; }

.newfile { position: relative; }

.newfile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 150px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    z-index: 50;
    padding: 6px;
}

.newfile-menu.open { display: block; }

.nf-item {
    display: block;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
}

.nf-item:hover { background: var(--accent-soft); color: var(--accent); }

.nf-item.nf-disabled { color: var(--text-faint); cursor: not-allowed; }
.nf-item.nf-disabled:hover { background: transparent; color: var(--text-faint); }

a.data-item-file[href="#"] { pointer-events: none; cursor: default; }

.img-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    background: var(--panel-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-faint);
    margin-bottom: 14px;
}

.img-stage img { max-width: 100%; max-height: 560px; }

/* Video preview stage: first-frame image with a big centered play overlay. */
.mov-stage { position: relative; display: inline-block; line-height: 0; max-width: 100%; cursor: pointer; }

.mov-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    line-height: 1;
    padding-left: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

/* PDF preview stage: first-page image with a big centered open/eye overlay. */
.doc-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    line-height: 1;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.doc-frame {
    display: block;
    width: 100%;
    height: 78vh;
    border: 0;
    border-radius: 10px;
    background: #ffffff;
}

.mov-video { display: block; max-width: 100%; max-height: 560px; border-radius: 10px; background: #000; }

.img-stage a { display: block; line-height: 0; max-width: 100%; }

.img-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.img-toolbar .btn { padding: 8px 11px; }

/* Data app - move file (MoveFile) */
.move-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 120px;
    background: var(--bg-2);
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    margin-bottom: 20px;
}

.move-icon {
    font-size: 2.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-icon .data-item-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}

.move-icon-target {
    color: var(--accent);
}

.move-arrow {
    font-size: 2rem;
    color: var(--text-faint);
}

/* Data app - share file (Share) */
.share-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: var(--bg-2);
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    margin-bottom: 20px;
}

.share-desc {
    margin-bottom: 20px;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.img-status { margin: -12px 0 16px; font-size: 0.78rem; color: var(--text-faint); }

.doc-info { margin: 0 0 16px; font-size: 0.9rem; color: var(--text-soft); }

/* Close-app X (top-left; girls have no nav menu) */
.app-close {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 100;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #b96536;
    background: rgba(26, 26, 26, 0.88);
    border: 1px solid rgba(139, 69, 19, 0.45);
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.15rem;
    line-height: 1;
    text-decoration: none;
    text-align: center;
    transition: color 160ms ease, border-color 160ms ease;
}
.app-close:hover {
    color: #dc7d48;
    border-color: #8B4513;
}

/* Push app content below the close X (the X only renders on app pages) */
.site > .app-close + * {
    margin-top: 48px;
}

/* Ask Nancy - chat */
.chat-log {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-height: 300px;
    max-height: 520px;
    overflow-y: auto;
}

.chat-msg {
    max-width: 76%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 1.05rem;
    line-height: 1.4;
}

.chat-msg p { margin: 0; }

.chat-user {
    align-self: flex-end;
    background: rgba(185, 101, 54, 0.22);
    color: var(--text);
}

.chat-girl {
    align-self: flex-start;
    background: var(--panel);
    color: var(--text);
}

.chat-compose {
    margin-top: 16px;
}

.chat-text {
    width: 100%;
    min-height: 48px;
    padding: 0.72rem 0.95rem;
    color: var(--text-soft);
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    resize: vertical;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.chat-text:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.chat-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.chat-toolbar .chat-features {
    width: 220px;
    padding: 0.72rem 0.95rem;
    color: var(--text-soft);
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.chat-toolbar .chat-features:disabled {
    color: var(--text-faint);
    background: var(--panel-2);
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .chat-text {
        min-height: 40px;
    }
}

/* Hint note (Ask app picker + empty states) */
.note {
    margin-top: 40px;
    padding: 20px 24px;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.7;
}
.note p { margin: 0; }

/* Welcome banner (home /u/ only) */
.welcome-banner {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    filter: saturate(0.95) contrast(1.03);
}

/* ToDo / Budget apps */
.todo-table .col-status { width: 1%; white-space: nowrap; text-align: center; }
.todo-table { min-width: 560px; }
.todo-table .col-topic { width: 100%; min-width: 180px; }
.todo-table td.col-topic { font-weight: 600; color: var(--text-soft); }
.todo-table .col-date { width: 1%; white-space: nowrap; }
.todo-table .col-actions { width: 1%; white-space: nowrap; }
.todo-table td.col-date { color: var(--text-faint); font-size: 0.85rem; }
.todo-table tfoot td { border-top: 2px solid var(--border-strong); border-bottom: none; }
.todo-toggle { text-decoration: none; font-size: 22px; line-height: 1; display: inline-block; }
.todo-toggle.on { color: var(--ok); }
.todo-toggle.off { color: var(--text-faint); }
.todo-toggle.off:hover { color: var(--text-soft); }
.todo-del { color: var(--danger); text-decoration: none; font-size: 18px; line-height: 1; }
.todo-del:hover { opacity: 0.75; }
.todo-edit { color: var(--accent); text-decoration: none; font-size: 18px; line-height: 1; margin-right: 10px; }
.todo-edit:hover { opacity: 0.75; }
.todo-scroll { overflow-x: auto; }
.todo-path { margin: 4px 0 0; color: var(--text-faint); }
.todo-path a { color: var(--accent); text-decoration: none; }
.todo-path a:hover { text-decoration: underline; }
/* ViewImg */
.viewimg-page { width: 100%; max-width: none; text-align: left; }
.viewimg-full { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); height: auto; display: block; }
.viewimg-info { margin-top: 16px; }
.viewimg-name { font-size: 1.15rem; font-weight: 600; margin: 0 0 4px; }
/* Calendar app */
.cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}
.cal-week {
    flex: 1;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.95rem;
}
.cal-arrow {
    min-width: 40px;
    text-align: center;
    text-decoration: none;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 20px;
}
.cal-day {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    padding: 10px 4px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.cal-day:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.cal-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    display: none;
}
.cal-day.has-friend .cal-dot { display: block; }
.cal-wd {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-faint);
}
.cal-num {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}
.cal-day.other-month .cal-num { color: var(--text-faint); }
.cal-day.other-month .cal-wd { opacity: 0.55; }
.cal-day.sunday { background: var(--bg-2); }
.cal-day.has-appt { background: rgba(110, 220, 150, 0.14); }
.cal-day.today {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px var(--focus-ring);
}
.cal-day.today .cal-num { color: var(--accent); }
.cal-day.selected {
    background: var(--accent);
    border-color: var(--accent-2);
}
.cal-day.selected .cal-num { color: #ffffff; }
.cal-day.selected .cal-wd { color: rgba(255, 255, 255, 0.85); }
.cal-selected-title {
    margin-top: 20px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}
.cal-today-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.cal-today-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
.cal-task-form {
    margin-top: 20px;
}
.cal-task-form h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.cal-appts-title {
    margin: 16px 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.appt-action {
    color: var(--accent);
    text-decoration: none;
    margin-right: 10px;
    font-size: 0.9rem;
}
.appt-action:hover { text-decoration: underline; }
.appt-action-del { color: var(--danger); }
@media (max-width: 720px) {
    .cal-grid { grid-template-columns: repeat(4, 1fr); }
    .cal-day.hide-phone { display: none; }
}

input[type="datetime-local"] {
    width: 100%;
    padding: 0.72rem 0.95rem;
    color: var(--text-soft);
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

/* Messenger */
.chat-row { display: flex; margin-bottom: 10px; }
.chat-row.mine { justify-content: flex-start; }
.chat-row.theirs { justify-content: flex-end; }
.chat-bubble {
    max-width: 72%;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.35);
}
.chat-row.mine .chat-bubble {
    background: #2e4357;
    border-color: #4d6a85;
    color: var(--text);
    border-radius: 0 14px 14px 14px;
}
.chat-row.theirs .chat-bubble {
    background: #2e4d37;
    border-color: #4d7a5a;
    color: var(--text);
    border-radius: 14px 0 14px 14px;
}
.msg-text { white-space: pre-wrap; word-break: break-word; }
.chat-time { display: block; font-size: 0.72rem; margin-top: 4px; opacity: 0.72; }
.chat-empty { color: var(--text-faint); text-align: center; padding: 24px 0; }
.thread-list { display: flex; flex-direction: column; gap: 8px; }
.thread-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    text-decoration: none;
    box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.35);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.thread-item.mine {
    background: #2e4d37;
    border-color: #4d7a5a;
    border-radius: var(--radius) 0 var(--radius) var(--radius);
}
.thread-item.theirs {
    background: #2e4357;
    border-color: #4d6a85;
    border-radius: 0 var(--radius) var(--radius) var(--radius);
}
.thread-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.thread-name { font-weight: 600; color: var(--text); }
.thread-status { font-size: 0.75rem; font-weight: 400; color: var(--text-faint); }
.thread-preview { font-size: 0.9rem; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-time { font-size: 0.75rem; color: var(--text-faint); }
.composer { margin-bottom: 20px; }
.composer-input { width: 100%; min-height: 60px; resize: vertical; padding: 10px 12px; font-family: inherit; font-size: 0.95rem; color: var(--text); background: #1a1a1a; border: 1px solid var(--border); border-radius: var(--radius); }
.composer-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.composer-input::placeholder { color: var(--text-faint); }
.composer-actions { display: flex; justify-content: flex-start; margin-top: 8px; }
.composer-divider { width: 1px; align-self: stretch; margin: 4px 10px; background: var(--border-strong, #d5dae1); }
.chat-divider { border: none; border-top: 1px solid var(--border-strong); margin: 20px 0; }
.badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}
.page-head h1 a { color: inherit; text-decoration: none; }
.page-head h1 a:hover { text-decoration: underline; }
.page-head h1 .breadcrumb-link { color: inherit; text-decoration: none; }
.page-head h1 .breadcrumb-link:hover { text-decoration: underline; }
.page-head h1 .breadcrumb-current { color: var(--text-faint); }

/* ===== Chronicles (theme: Nancy - rust) ===== */
.chronicle-list { margin-top: 24px; }
.chronicle-entry { margin-bottom: 16px; padding: 0; background: #2d2d2d; border: 1px solid rgba(139, 69, 19, 0.5); border-radius: 14px; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35); }
.chronicle-title { margin: 0; padding: 6px 12px; font-size: 1.15rem; font-weight: 600; color: #e8e8e8; background: rgba(185, 101, 54, 0.22); border-radius: 14px 14px 0 0; overflow-wrap: anywhere; }
.chronicle-meta { margin: 0; padding: 5px 12px; font-size: 0.8rem; color: #cfcfcf; display: flex; gap: 16px; background: rgba(0, 0, 0, 0.28); border-radius: 0; flex-wrap: wrap; }
.chronicle-folder { color: #dc7d48; text-decoration: none; }
.chronicle-folder:hover { text-decoration: underline; }
.chronicle-folder-no { color: var(--text-faint); }
.chronicle-actions { margin-left: auto; display: flex; gap: 12px; }
.chronicle-actions a { color: #dc7d48; text-decoration: none; }
.chronicle-actions a:hover { text-decoration: underline; }
.chronicle-actions a.chronicle-del { color: #ff9d9d; }
.chronicle-body { margin-top: 0; padding: 14px 20px 18px; color: #e8e8e8; line-height: 1.6; overflow-wrap: anywhere; }
.chronicle-body p { margin: 0 0 10px; }
.chronicle-body p:last-child { margin-bottom: 0; }
.chronicle-body h1, .chronicle-body h2, .chronicle-body h3, .chronicle-body h4, .chronicle-body h5, .chronicle-body h6 { margin: 12px 0 6px; }
.chronicle-body ul, .chronicle-body ol { margin: 0 0 10px; padding-left: 22px; }
.chronicle-body img { max-width: 100%; height: auto; }
.chronicle-body blockquote { margin: 0 0 10px; padding: 8px 16px; border-left: 3px solid #b96536; background: rgba(0, 0, 0, 0.22); }
.chronicle-body pre { margin: 0 0 10px; padding: 12px; background: rgba(0, 0, 0, 0.22); overflow-x: auto; }
.chronicle-body code { font-family: Consolas, 'Courier New', monospace; font-size: 0.9em; }
.folder-link { display: block; margin-top: 6px; color: #dc7d48; font-size: 0.8rem; text-decoration: none; }
.folder-prefix { color: #8a8a8a; font-size: 0.8rem; }
.folder-link:hover { text-decoration: underline; }
@media (max-width: 640px) { .chronicle-body { padding: 12px 14px 14px; } }

.fit-title { white-space: nowrap; }

.fit-path { white-space: nowrap; }

.fit-path { white-space: nowrap; overflow-x: auto; overflow-y: hidden; max-width: 100%; }
.page { min-width: 0; }

/* Notifications bar - count shown once on page load */
.notif-bar { width: 100%; max-width: 960px; margin: 0 auto 20px; padding: 12px 16px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--panel); color: var(--text); font-size: 0.95rem; text-align: left; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.notif-bar .notif-ico { font-size: 1.15rem; line-height: 1; }
.notif-bar .notif-msg { flex: 1; }
.notif-bar:empty { display: none; }
