:root {
  color-scheme: dark;
  --bg: #0B0D12;
  --surface: #12151C;
  --surface-raised: #171B24;
  --border: #222733;
  --text: #E8EAF0;
  --muted: #9AA3B2;
  --accent: #8B9DFF;
  --accent-strong: #7186F5;
  --amber: #E5B567;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { width: 18px; height: 18px; display: block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-shell { min-height: 100vh; }
.site-header { height: 76px; max-width: 1280px; margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 16px; font-weight: 650; letter-spacing: -.025em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #0B0D12; background: var(--accent); }
.brand-mark .icon { width: 18px; height: 18px; }
.header-action { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; transition: background .16s ease, border-color .16s ease; }
.sign-in-header { min-width: 88px; border-color: #3b456e; color: var(--accent); }
.account { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #3a4154; border-radius: 50%; background: #202536; color: #dfe3ff; font-size: 12px; font-weight: 650; }
.account-name { color: #c5cbd6; font-size: 13px; }
.account .header-action { min-height: 40px; margin-left: 4px; }
.main-content { width: min(100% - 80px, 1120px); margin: 0 auto; padding: 74px 0 96px; }
.hero { max-width: 900px; }
.domain-label { margin: 0 0 21px; color: var(--accent); font: 12px/1.5 var(--mono); letter-spacing: .015em; }
h1 { max-width: 900px; margin: 0; color: var(--text); font-size: 56px; font-weight: 700; line-height: 1.08; letter-spacing: -.055em; }
.hero-copy { max-width: 570px; margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.segmented { width: fit-content; display: inline-flex; align-items: center; gap: 4px; margin-top: 38px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: #101219; }
.segment { min-height: 44px; min-width: 104px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; transition: background .16s ease, color .16s ease; }
.segment .icon { width: 15px; height: 15px; }
.segment.active { background: var(--text); color: #11141B; }
.view-content { margin-top: 42px; }
.file-section { width: 100%; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.section-heading h2, .private-intro h2 { margin: 0; color: var(--text); font-size: 21px; font-weight: 650; line-height: 1.3; letter-spacing: -.035em; }
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.section-count { padding-bottom: 2px; color: var(--muted); font: 11px/1.5 var(--mono); white-space: nowrap; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.file-card { min-width: 0; min-height: 198px; padding: 18px; display: flex; flex-direction: column; align-items: stretch; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.file-card-top { min-height: 30px; display: flex; align-items: center; gap: 10px; }
.extension { min-width: 42px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #303646; border-radius: 7px; background: #191E29; color: #BBC4D3; font: 10px/1 var(--mono); letter-spacing: .02em; }
.file-size { margin-left: auto; color: #AEB7C6; font: 11px/1.4 var(--mono); white-space: nowrap; }
.file-name { margin: 20px 0 0; color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; overflow-wrap: anywhere; }
.file-updated { margin: 6px 0 19px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.button { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 650; text-decoration: none; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.button .icon { width: 16px; height: 16px; }
.button-primary { background: var(--accent); color: #0B0D12; }
.button-subtle { border-color: #30374A; background: #1B2030; color: #DDE2FF; }
.button-outline { border-color: #303746; background: transparent; color: #C3CAD6; }
.download-full { width: 100%; margin-top: auto; }
.private-card { min-height: 215px; }
.private-badge { min-height: 26px; margin-left: auto; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #5a472b; border-radius: 999px; background: #282116; color: var(--amber); font-size: 10px; font-weight: 600; white-space: nowrap; }
.private-badge .icon { width: 12px; height: 12px; }
.private-card .file-size { margin-left: 0; }
.private-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.path-label { min-height: 44px; display: flex; align-items: center; gap: 9px; color: #BCC5D5; font: 12px/1.5 var(--mono); }
.path-label .icon { width: 15px; height: 15px; color: var(--amber); }
.private-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.upload-button { position: relative; min-width: 104px; cursor: pointer; }
.private-files .file-grid { padding-top: 2px; }
.private-grid .file-name { margin-top: 17px; }
.private-intro { padding: 10px 30px 0 0; }
.private-intro h2 { max-width: 470px; font-size: clamp(24px, 3vw, 31px); line-height: 1.2; letter-spacing: -.045em; }
.private-intro ul { margin: 26px 0 0; padding: 0; display: grid; gap: 17px; list-style: none; }
.private-intro li { position: relative; padding-left: 21px; color: #A9B1C0; font-size: 13px; line-height: 1.55; }
.private-intro li::before { position: absolute; top: .55em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); content: ''; }
.login-card { max-width: 480px; padding: 25px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.login-card h3 { margin: 0; color: var(--text); font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.login-card > p:first-of-type { margin: 6px 0 23px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.login-card label { display: block; margin: 16px 0 7px; color: #C8CED9; font-size: 11px; font-weight: 600; }
.field { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #2A303D; border-radius: 9px; background: #0D1016; color: var(--text); font-size: 14px; outline: none; }
.field::placeholder { color: #667080; }
.login-submit { width: 100%; margin-top: 20px; }
.login-note { margin: 15px 0 0; color: #929BAB; font-size: 11px; line-height: 1.5; }
.form-error { min-height: 0; margin: 10px 0 0; color: #F19AA4; font-size: 12px; line-height: 1.4; }
.login-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); align-items: center; gap: clamp(38px, 9vw, 120px); }
.toast-region { position: fixed; z-index: 5; inset: auto 20px calc(20px + env(safe-area-inset-bottom, 0px)); width: fit-content; max-width: calc(100vw - 40px); margin: 0 auto; padding: 12px 16px; border: 1px solid #333B52; border-radius: 11px; background: #1A1F2B; color: var(--text); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.toast-region.visible { opacity: 1; transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
  .header-action:hover { border-color: #3B4562; background: #171B25; }
  .sign-in-header:hover, .button-primary:hover { background: #A1AEFF; }
  .segment:not(.active):hover { background: #1B202A; color: var(--text); }
  .file-card:hover { border-color: #343B4B; background: #141821; transform: translateY(-2px); }
  .button-subtle:hover { border-color: #46506C; background: #242A3B; }
  .button-outline:hover { border-color: #475067; background: #191E28; color: var(--text); }
}
button:active, .button:active { transform: scale(.985); }
@media (max-width: 760px), (pointer: coarse) and (hover: none) {
  .site-header { height: 66px; padding: 0 20px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .main-content { width: min(100% - 40px, 620px); padding: 53px 0 76px; }
  .domain-label { margin-bottom: 16px; font-size: 11px; }
  h1 { font-size: clamp(35px, 8.4vw, 46px); line-height: 1.08; letter-spacing: -.05em; }
  .desktop-break { display: none; }
  .hero-copy { margin-top: 15px; font-size: 14px; line-height: 1.6; }
  .segmented { margin-top: 27px; }
  .segment { min-width: 98px; }
  .view-content { margin-top: 31px; }
  .section-heading h2 { font-size: 18px; }
  .section-heading p { max-width: 260px; font-size: 12px; }
  .file-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 11px; }
  .file-card { min-height: 188px; padding: 16px; border-radius: 14px; }
  .private-card { min-height: 206px; }
  .file-name { margin-top: 17px; font-size: 14px; }
  .file-updated { margin: 5px 0 16px; font-size: 11px; }
  .login-section { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .private-intro { padding: 0; }
  .private-intro h2 { max-width: 420px; font-size: 25px; }
  .private-intro ul { margin-top: 19px; gap: 11px; }
  .login-card { max-width: none; padding: 20px; }
  .field { font-size: 16px; }
  .toast-region { inset-inline: 16px; max-width: calc(100vw - 32px); text-align: center; }
}
@media (max-width: 420px) {
  .site-header { padding: 0 17px; }
  .main-content { width: calc(100% - 32px); padding-top: 45px; }
  .account { gap: 7px; }
  .account-name { display: none; }
  .account .header-action { padding-inline: 11px; }
  h1 { font-size: 38px; }
  .section-heading { align-items: start; }
  .section-count { padding-top: 4px; }
  .private-toolbar { align-items: start; }
  .path-label { font-size: 12px; }
  .private-badge { min-height: 30px; padding-inline: 9px; }
  .file-card-top { gap: 7px; }
}
/* Larger touch-friendly cards and readable type on phones. */
@media (max-width: 760px), (pointer: coarse) and (hover: none) {
  .main-content { width: min(calc(100% - 32px), 620px); }
  .hero-copy { font-size: 16px; line-height: 1.65; }
  .segment { min-height: 52px; min-width: 112px; font-size: 15px; }
  .section-heading h2 { font-size: 21px; }
  .section-heading p { font-size: 14px; }
  .section-count { font-size: 12px; }
  .file-grid { gap: 14px; }
  .file-card { min-height: 220px; padding: 20px; border-radius: 16px; }
  .file-card-top { min-height: 36px; gap: 10px; }
  .extension { min-width: 48px; height: 34px; font-size: 12px; }
  .file-size { font-size: 13px; }
  .file-name { margin-top: 20px; font-size: 18px; }
  .file-updated { margin: 7px 0 18px; font-size: 14px; }
  .button { min-height: 52px; font-size: 15px; }
  .button .icon { width: 18px; height: 18px; }
}
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px; }
  .header-action, .segment, .button { min-height: 44px; }
}
@media (pointer: coarse) and (hover: none) {
  .main-content { width: min(calc(100% - 40px), 1120px); }
  .file-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) and (hover: none) and (min-width: 761px) {
  .site-header { height: 102px; padding-inline: 32px; }
  .brand { gap: 14px; font-size: 23px; }
  .brand-mark { width: 46px; height: 46px; border-radius: 13px; }
  .brand-mark .icon { width: 23px; height: 23px; }
  .header-action { min-height: 68px; padding-inline: 22px; font-size: 18px; }
  .main-content { padding-top: 68px; }
  .domain-label { margin-bottom: 23px; font-size: 16px; }
  h1 { max-width: 1100px; font-size: clamp(64px, 7.5vw, 76px); }
  .hero-copy { max-width: 800px; margin-top: 23px; font-size: 22px; }
  .segmented { margin-top: 43px; padding: 6px; border-radius: 15px; }
  .segment { min-height: 70px; min-width: 158px; padding-inline: 22px; border-radius: 11px; font-size: 19px; }
  .segment .icon { width: 20px; height: 20px; }
  .view-content { margin-top: 51px; }
  .section-heading { margin-bottom: 25px; }
  .section-heading h2, .private-intro h2 { font-size: 29px; }
  .section-heading p { margin-top: 8px; font-size: 17px; }
  .section-count { font-size: 15px; }
  .file-grid { gap: 18px; }
  .file-card, .private-card { min-height: 360px; padding: 32px; border-radius: 24px; }
  .file-card-top { min-height: 44px; gap: 14px; }
  .extension { min-width: 61px; height: 43px; padding-inline: 12px; border-radius: 10px; font-size: 16px; }
  .file-size { font-size: 17px; }
  .private-badge { min-height: 38px; padding-inline: 13px; font-size: 14px; }
  .private-badge .icon { width: 17px; height: 17px; }
  .file-name { margin-top: 27px; font-size: 28px; }
  .file-updated { margin: 10px 0 28px; font-size: 21px; }
  .button { min-height: 78px; padding-inline: 24px; gap: 12px; border-radius: 14px; font-size: 22px; }
  .button .icon { width: 21px; height: 21px; }
  .private-actions { gap: 12px; }
  .private-toolbar { margin-bottom: 25px; }
  .path-label { min-height: 62px; gap: 13px; font-size: 18px; }
  .path-label .icon { width: 21px; height: 21px; }
  .upload-button { min-width: 150px; }
  .private-intro { padding-right: 20px; }
  .private-intro ul { margin-top: 28px; gap: 18px; }
  .private-intro li { padding-left: 24px; font-size: 18px; }
  .login-card { padding: 30px; border-radius: 22px; }
  .login-card h3 { font-size: 24px; }
  .login-card > p:first-of-type { margin: 9px 0 26px; font-size: 17px; }
  .login-card label { margin: 19px 0 9px; font-size: 16px; }
  .field { height: 64px; padding-inline: 17px; font-size: 18px; }
  .login-submit { margin-top: 24px; }
  .login-note { margin-top: 18px; font-size: 15px; }
}
.dashboard { width: 100%; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.dashboard-kicker { margin: 0 0 9px; color: var(--accent); font: 11px/1.4 var(--mono); letter-spacing: .08em; }
.dashboard-heading h2, .shared-file h2 { margin: 0; color: var(--text); font-size: clamp(25px, 3vw, 34px); font-weight: 650; letter-spacing: -.04em; }
.dashboard-heading > div > p:last-child, .shared-file > p:not(.dashboard-kicker) { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.dashboard-summary { display: flex; gap: 12px; margin-bottom: 22px; }
.dashboard-summary > div { min-width: 124px; padding: 14px 17px; display: grid; gap: 8px; border: 1px solid var(--border); border-radius: 12px; background: #10131A; }
.dashboard-summary span { color: var(--muted); font-size: 12px; }
.dashboard-summary strong { color: var(--text); font: 600 20px/1 var(--mono); }
.manage-list { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.manage-list-heading, .manage-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 205px; align-items: center; gap: 18px; }
.manage-list-heading { min-height: 45px; padding: 0 19px; border-bottom: 1px solid var(--border); color: #778193; font: 10px/1 var(--mono); letter-spacing: .07em; }
.manage-row { min-height: 78px; padding: 13px 19px; border-bottom: 1px solid #202530; }
.manage-row:last-child { border-bottom: 0; }
.manage-file { min-width: 0; display: flex; align-items: center; gap: 13px; }
.manage-file-info { min-width: 0; display: grid; gap: 6px; }
.manage-file-info strong { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.manage-file-info > span { color: var(--muted); font-size: 11px; }
.manage-file-info i { padding-inline: 3px; color: #636E7F; font-style: normal; }
.visibility-select-label { display: none; }
.visibility-select { width: 100%; min-height: 42px; padding: 0 32px 0 12px; border: 1px solid #303746; border-radius: 9px; background: #10131A; color: var(--text); font: 12px var(--sans); }
.manage-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.manage-actions .button { min-height: 42px; white-space: nowrap; }
.public-status { color: #9CA6B7; font-size: 11px; white-space: nowrap; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #34303A; border-radius: 10px; background: transparent; color: #CF8992; }
.icon-button .icon { width: 17px; height: 17px; }
.empty-files { grid-column: 1 / -1; margin: 0; padding: 25px; color: var(--muted); font-size: 14px; }
.dashboard-footnote { margin: 14px 0 0; color: #778193; font-size: 11px; line-height: 1.6; }
.shared-file { max-width: 650px; margin: 8vh auto 0; }
.shared-file > .file-card { margin-top: 28px; }
.shared-back { display: inline-block; margin-top: 20px; color: var(--muted); font-size: 13px; }
@media (max-width: 760px), (pointer: coarse) and (hover: none) {
  .dashboard-heading { align-items: start; flex-direction: column; }
  .dashboard-heading .upload-button { min-height: 52px; }
  .dashboard-summary { gap: 8px; }
  .dashboard-summary > div { min-width: 0; flex: 1; padding: 12px; }
  .dashboard-summary strong { font-size: 18px; }
  .manage-list { overflow: visible; border: 0; background: transparent; }
  .manage-list-heading { display: none; }
  .manage-row { grid-template-columns: minmax(0, 1fr) auto; gap: 13px 10px; margin-bottom: 11px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
  .manage-file { grid-column: 1 / -1; }
  .manage-file-info strong { font-size: 15px; }
  .manage-file-info > span { font-size: 12px; }
  .visibility-select-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
  .visibility-select { min-height: 46px; font-size: 14px; }
  .manage-actions { gap: 8px; }
  .manage-actions .button { min-height: 46px; padding-inline: 12px; font-size: 13px; }
  .public-status { max-width: 105px; text-align: right; white-space: normal; }
  .icon-button { width: 46px; height: 46px; }
  .dashboard-footnote { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
