main { max-width: 640px; margin: 0 auto; padding: clamp(8px, 4dvh, 40px) 24px 96px; text-align: center; }
nav { display: flex; gap: 18px; }

/* El anillo encoge al entrar en la unidad y deja sitio a los archivos. */
body[data-view="drive"] .ring { width: min(58vw, 250px); }
body[data-view="create"] .ring, body[data-view="open"] .ring { width: min(44vw, 170px); }
body[data-view="create"] .ring .core, body[data-view="open"] .ring .core { opacity: 0; }
.ring .core { transition: opacity .3s; }
.ring:not(:disabled) { cursor: pointer; }
.ring:not(:disabled):hover { transform: scale(1.025); }
.ring:not(:disabled):active { transform: scale(.985); }
.ring:disabled { color: inherit; }
body.dragging .ring { transform: scale(1.08); }

.view { display: none; margin-top: clamp(20px, 4dvh, 36px); }
body[data-view="start"] .view[data-for="start"], body[data-view="open"] .view[data-for="open"],
body[data-view="create"] .view[data-for="create"], body[data-view="drive"] .view[data-for="drive"] {
  display: grid; gap: 18px; justify-items: center; animation: rise .6s var(--ease) both; }
.view h1 { font-size: clamp(30px, 6vw, 44px); }
.lead { max-width: 28em; }
.choices { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.sheet { text-align: left; }
.sheet > * { width: 100%; max-width: 440px; }
.sheet h1 { text-align: center; }
.field { display: grid; gap: 8px; }
input:not([type=checkbox]):not([type=file]), textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; transition: border-color .2s; }
input:focus, textarea:focus { outline: none; border-color: var(--ink); }
textarea { font: 13px/1.5 var(--mono); resize: vertical; word-break: break-all; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--soft); }
.check input { accent-color: var(--ink); width: 16px; height: 16px; }
.hint { font-size: 13px; color: var(--soft); }

.places { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.place { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px;
         animation: rise .45s var(--ease) both; }
.place .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.place .side { display: flex; align-items: baseline; gap: 14px; font-size: 14px; color: var(--soft); white-space: nowrap; }
.place .bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.place .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--c, var(--ink)); border-radius: 3px;
                transition: width .8s var(--ease); }
.place.off { opacity: .6; }
.picker { display: grid; gap: 8px; animation: rise .4s var(--ease) both; }
.picker .row { display: flex; gap: 8px; }
.picker .row input { flex: 1; min-width: 0; }
.picker .alts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.space { width: 100%; display: grid; gap: 12px; justify-items: start; text-align: left; margin-top: 28px; padding-top: 24px;
         border-top: 1px solid var(--line); }
.space h2 { font-size: 26px; }
.space .places, .space .picker { width: 100%; }
#drive-meta { min-height: 1.4em; }
.place .name { display: flex; align-items: center; gap: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink)); flex: none; }
.place input { padding: 8px 12px; border-radius: 10px; font-size: 15px; }
.add { display: flex; gap: 8px; flex-wrap: wrap; }
.summary { font: 400 19px/1.35 var(--serif); text-align: center; min-height: 2.7em; }

.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 14px;
          border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; }
.queue { min-height: 1.4em; }

.files { list-style: none; margin: 10px 0 0; padding: 0; width: 100%; text-align: left; }
.file { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: baseline; padding: 14px 4px;
        border-top: 1px solid var(--line); transition: opacity .3s, transform .3s var(--ease), background .2s; }
.file:last-child { border-bottom: 1px solid var(--line); }
.file.new { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.file.leaving { opacity: 0; transform: translateX(24px); }
.file .title { font: 400 19px/1.3 var(--serif); overflow-wrap: anywhere; }
.file .info { grid-column: 1; font-size: 13px; color: var(--soft); }
.file .acts { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 14px; align-self: center; opacity: .0; transition: opacity .2s; }
.file:hover .acts, .file:focus-within .acts { opacity: 1; }
@media (hover: none) { .file .acts { opacity: 1; } }
.empty { margin-top: 6px; max-width: 24em; }
.tools { display: flex; gap: 20px; justify-content: center; align-items: center; margin-top: 14px; }
.health { font-size: 14px; min-height: 1.5em; white-space: pre-line; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(92vw, 520px); display: flex; gap: 14px;
         align-items: center; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 16px; font-size: 15px;
         text-align: left; animation: rise .4s var(--ease) both; z-index: 5; }
.toast .link { color: inherit; opacity: .7; flex: none; }

.dropveil { position: fixed; inset: 0; display: grid; place-items: end center; padding-bottom: 12dvh; pointer-events: none; opacity: 0;
            transition: opacity .25s; background: color-mix(in srgb, var(--paper) 78%, transparent); font: 400 24px var(--serif); z-index: 4; }
body.dragging .dropveil { opacity: 1; }
body.dragging .ring { position: relative; z-index: 6; }

dialog { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: 28px;
         max-width: 520px; width: calc(100% - 32px); text-align: left; }
dialog[open] { display: grid; gap: 14px; animation: rise .4s var(--ease) both; }
dialog h2 { font-size: 28px; }
dialog::backdrop { background: color-mix(in srgb, var(--paper) 70%, transparent); backdrop-filter: blur(6px); }
dialog .choices { justify-content: flex-start; }
