dialog.action-dialog, .is-admin-view dialog.action-dialog { box-sizing: border-box; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper, var(--toolbar-bg)); color: var(--ink); box-shadow: 0 24px 80px #0005; }
dialog.action-dialog::backdrop { background: #080d1899; backdrop-filter: blur(6px); }
dialog.action-dialog h2 { margin: 0 0 14px; font-size: 19px; line-height: 1.5; }
.action-dialog-message { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.action-dialog-actions, .action-dialog .actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
dialog.action-dialog button { width: auto; min-height: 38px; margin: 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft, var(--button-bg)); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
dialog.action-dialog button.primary { background: var(--blue, #4c75d9); border-color: transparent; color: #fff; }
dialog.action-dialog :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.action-dialog textarea { box-sizing: border-box; width: 100%; }
@media (max-width: 600px) { dialog.action-dialog, .is-admin-view dialog.action-dialog { padding: 20px; } dialog.action-dialog button { min-height: 44px; } }
.header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.header-actions > #theme-toggle { box-sizing: border-box; height: 36px; min-height: 36px; margin: 0; }
.account-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-header-actions[hidden] { display: none !important; }
.header-actions > [hidden] { display: none !important; }
.header-actions .account-menu { position: relative; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; height: 36px; }
.account-menu > summary { box-sizing: border-box; display: flex; align-items: center; height: 36px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 13px; list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 100; width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 12px 30px #0003; }
.account-menu-panel > button, .account-menu-panel > a { box-sizing: border-box; display: block; width: 100%; margin: 0; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; text-decoration: none; font: inherit; font-size: 13px; cursor: pointer; }
.account-menu-panel > :hover { background: var(--soft); }
.account-menu-panel > :last-child { margin-top: 5px; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; color: #e27480; }
.account-switch-list { display: grid; gap: 10px; margin-top: 20px; }
.account-switch-list > button { width: 100%; padding: 14px; text-align: left; overflow-wrap: anywhere; }
.account-switch-list > button:disabled { color: var(--accent); opacity: 1; }
.account-add { display: block; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--accent); text-decoration: none; text-align: center; }
.account-header-actions > button { margin: 0; height: 36px; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 12px; line-height: 20px; cursor: pointer; }
.account-password-dialog { max-width: 460px; }
.account-password-form { display: grid; gap: 14px; margin-top: 20px; }
.account-password-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.account-password-form input { box-sizing: border-box; width: 100%; min-width: 0; height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
.account-code-row { display: flex; align-items: center; gap: 10px; }
.account-code-row input { flex: 1; width: 120px; }
.account-code-row button { flex-shrink: 0; }
.account-password-form .muted { margin: 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.account-password-form [role="status"] { margin: 0; }
.account-password-form [role="status"]:empty { display: none; }
.account-password-form > button[type="submit"] { justify-self: start; background: var(--blue); color: white; }
.header-actions > button, .header-actions > a { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; margin: 0; vertical-align: middle; }
.header-actions > #settings-shortcut { height: 36px; padding: 7px 13px; font-size: 12px; line-height: 20px; border-radius: 10px; }
.header-actions .service-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; min-height: 36px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; transition: background .15s, border-color .15s; }
.service-trigger::before { content: ''; width: 16px; height: 16px; background: currentColor; flex-shrink: 0; }
.notice-trigger::before { clip-path: polygon(44% 0,56% 0,60% 12%,76% 23%,81% 68%,94% 81%,94% 88%,6% 88%,6% 81%,19% 68%,24% 23%,40% 12%); }
.support-trigger::before { clip-path: polygon(0 10%,100% 10%,100% 78%,40% 78%,16% 100%,16% 78%,0 78%); }
.header-actions .service-trigger:hover { background: var(--soft); border-color: var(--accent); }
.notice-badge { min-width: 18px; padding: 0 5px; border-radius: 20px; background: #e74e65; color: white; font-size: 11px; line-height: 18px; text-align: center; }
.service-dialog, .is-admin-view dialog.service-dialog { box-sizing: border-box; width: min(580px, calc(100vw - 28px)); max-height: 85dvh; padding: 24px; overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 90px #0006; }
.service-dialog.notice-dialog, .is-admin-view dialog.service-dialog.notice-dialog { width: min(960px, calc(100vw - 28px)); }
.service-dialog.notice-dialog[open], .is-admin-view dialog.service-dialog.notice-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.notice-dialog > .service-heading { flex-shrink: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.notice-dialog-body { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
.service-dialog::backdrop { background: #080d18a6; backdrop-filter: blur(5px); }
.service-dialog [hidden] { display: none !important; }
.service-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.service-heading h2 { margin: 0; font-size: 21px; letter-spacing: .02em; }
.service-dialog button { min-height: 34px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.service-dialog button:hover:not(:disabled) { border-color: var(--accent); }
.service-dialog button:disabled { opacity: .45; cursor: not-allowed; }
.service-dialog .service-close { width: 34px; padding: 0; font-size: 24px; background: transparent; border-color: transparent; color: var(--muted); }
.service-dialog [role="status"] { margin: 12px 0 18px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.service-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.notice-list { display: grid; gap: 12px; }
.notice-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); overflow-wrap: anywhere; }
.notice-card.is-unread { border-left: 3px solid var(--blue); }
.notice-card small { color: var(--muted); font-size: 12px; }
.notice-card.is-unread small { color: var(--accent); }
.notice-card p { white-space: pre-wrap; margin: 12px 0; line-height: 1.8; font-size: 14px; }
.support-tabs { display: flex; gap: 4px; padding: 4px; margin: 20px 0 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.support-tabs button { flex: 1; background: transparent; border-color: transparent; }
.support-tabs button[aria-pressed="true"] { background: var(--paper); border-color: var(--line); color: var(--accent); box-shadow: 0 2px 6px #0001; }
.support-log { max-height: 32dvh; overflow: auto; overflow-wrap: anywhere; }
.support-exchange { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.support-message { align-self: flex-start; max-width: 90%; margin: 0; padding: 12px 15px; background: var(--soft); border: 1px solid var(--line); border-radius: 3px 14px 14px; white-space: pre-wrap; font-size: 14px; line-height: 1.8; }
.support-message.is-user { align-self: flex-end; background: var(--blue); border-color: transparent; color: white; border-radius: 14px 3px 14px 14px; }
.support-dialog form { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.support-dialog label { display: flex; flex-direction: column; gap: 9px; color: var(--muted); font-size: 12px; }
.support-dialog textarea { box-sizing: border-box; width: 100%; min-height: 100px; resize: vertical; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.7; }
.service-dialog :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.support-dialog button[type="submit"] { align-self: flex-end; min-width: 88px; background: var(--blue); color: white; border-color: transparent; }
.support-contacts { white-space: pre-wrap; overflow-wrap: anywhere; padding: 24px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.9; }
@media (max-width: 600px) { .header-actions { gap: 6px; } .header-actions .service-trigger { padding: 6px 9px; font-size: 12px; } .service-dialog, .is-admin-view dialog.service-dialog { padding: 18px; border-radius: 16px; } }
@media (max-width: 760px) {
  .header-actions, .account-header-actions { min-width: 0; }
  .header-actions > button, .header-actions > a, .header-actions .service-trigger,
  .header-actions > #theme-toggle, .account-menu > summary,
  .account-header-actions > button { height: auto; min-height: 44px; }
  .service-heading { gap: 8px; }
  .service-heading h2 { min-width: 0; overflow-wrap: anywhere; }
  .service-dialog button { min-height: 44px; }
  .service-dialog .service-close { flex-shrink: 0; width: 44px; }
  .support-dialog textarea, .account-password-form input { font-size: 16px; }
  .account-code-row, .service-toolbar { flex-wrap: wrap; }
  .support-tabs { flex-wrap: wrap; }
}
