/* Panels: clock badge, 도감, naming modal, info-square extras. Uses the tokens from app.css. */
.alal-pn-slot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.alal-pn-fallback { position: fixed; right: 16px; top: 64px; z-index: 5; justify-content: flex-end; max-width: calc(100% - 32px); }

.alal-pn-badge { display: inline-flex; align-items: baseline; gap: 6px; background: var(--paper, #f6f2ea); border: 1px solid var(--line, #d6cdbd); border-radius: 999px; padding: 6px 12px; font-size: 13px; box-shadow: var(--shadow); white-space: nowrap; font-variant-numeric: tabular-nums; }
.alal-pn-badge b { font-weight: 700; }
.alal-pn-time { color: var(--ink, #1f2a2e); }
.alal-pn-age { color: var(--muted, #6c6a63); border-left: 1px solid var(--line, #d6cdbd); padding-left: 6px; }
.alal-pn-age[hidden] { display: none; }

/* Focus rings for everything this module adds. */
.alal-pn-slot button:focus-visible,
.alal-pn-dialog button:focus-visible,
.alal-pn-dialog input:focus-visible,
.alal-pn-found button:focus-visible { outline: 2px solid var(--accent, #c8643b); outline-offset: 2px; }

/* Dialogs (inherit the base dialog look from app.css). */
.alal-pn-dialog { width: min(560px, calc(100% - 32px)); max-height: min(80vh, 760px); overflow: auto; padding: 16px 18px 18px; }
.alal-pn-dialog[open] { display: flex; flex-direction: column; }
.alal-pn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.alal-pn-head h2 { margin: 0; font-size: 20px; }
.alal-pn-x { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted, #6c6a63); padding: 2px 8px; border-radius: 6px; }
.alal-pn-x:hover { background: var(--paper-2, #ece6da); }
.alal-pn-sub { margin: 0 0 10px; color: var(--muted, #6c6a63); font-size: 14px; }

.alal-pn-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, #d6cdbd); margin-bottom: 10px; }
.alal-pn-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font-size: 15px; color: var(--muted, #6c6a63); margin-bottom: -1px; }
.alal-pn-tab[aria-selected="true"] { color: var(--ink, #1f2a2e); border-bottom-color: var(--accent, #c8643b); font-weight: 700; }
.alal-pn-panel { min-height: 0; overflow: auto; }
.alal-pn-panel[hidden] { display: none; }

.alal-pn-list { list-style: none; margin: 0; padding: 0; }
.alal-pn-item { padding: 10px 0; border-top: 1px solid var(--line, #d6cdbd); }
.alal-pn-item:first-child { border-top: 0; padding-top: 2px; }
.alal-pn-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.alal-pn-row b { font-size: 15px; overflow-wrap: anywhere; min-width: 0; }
.alal-pn-val { font-size: 13px; color: var(--muted, #6c6a63); white-space: nowrap; font-variant-numeric: tabular-nums; }
.alal-pn-tag { font-size: 11px; color: var(--muted, #6c6a63); border: 1px solid var(--line, #d6cdbd); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.alal-pn-tag.is-named { color: var(--ink, #1f2a2e); border-color: var(--ink, #1f2a2e); }
.alal-pn-note { margin: 4px 0 0; font-size: 12px; color: var(--muted, #6c6a63); overflow-wrap: anywhere; }

/* Composition bar: one flat strip split by share, with a 10-cell guide like the 10×10 grid. */
.alal-pn-comp { margin-top: 6px; }
.alal-pn-bar { position: relative; display: flex; height: 14px; width: 100%; border: 1px solid var(--line, #d6cdbd); border-radius: 3px; overflow: hidden; background: #f4f2eb; }
.alal-pn-bar i { display: block; min-width: 2px; flex-basis: 0; }
.alal-pn-bar::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0, 0, 0, .18) calc(10% - 1px) 10%); }
.alal-pn-comptext { margin: 3px 0 0; font-size: 12px; color: var(--ink, #1f2a2e); overflow-wrap: anywhere; }

/* Naming form. */
.alal-pn-form { margin-top: 12px; }
.alal-pn-label { display: block; font-size: 14px; margin: 0 0 4px; }
.alal-pn-form input { display: block; width: 100%; padding: 9px 10px; border: 1px solid var(--line, #d6cdbd); border-radius: 8px; font: inherit; background: #fff; }
.alal-pn-err { margin: 6px 0 0; }
.alal-pn-err[hidden] { display: none; }
.alal-pn-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.alal-pn-actions button { padding: 8px 16px; border-radius: 8px; }
.alal-pn-actions button:disabled { opacity: .55; cursor: default; }

/* Info square extras. */
.alal-info-extra { margin-top: 8px; }
.alal-pn-facts { margin-top: 0; }
.alal-pn-found { border-top: 1px solid var(--line, #d6cdbd); padding-top: 8px; margin-top: 8px; font-size: 13px; }
.alal-pn-found p { margin: 0; overflow-wrap: anywhere; }
.alal-pn-namebtn { margin-top: 8px; box-shadow: none; }

/* Phones: dialogs become bottom sheets. */
@media (max-width: 480px) {
  .alal-pn-badge { padding: 5px 10px; font-size: 12px; }
  .alal-pn-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 14px 14px 0 0; border-bottom: 0; max-height: 85vh; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .alal-pn-actions button { flex: 1 1 auto; }
}
