@import url("/lettering.css");

:root {
  font: 1rem/1.55 var(--batang-text), system-ui, -apple-system, "PingFang SC", sans-serif;
  --page: #faf0ec;
  --ink: #302019;
  --accent: #713925;
  --muted: #74564b;
  --surface: #fffaf7;
  --glass: #fffaf7b8;
  --line: #e5cdc5;
  --focus: #904f3b;
  --shadow: 0 16px 33px -20px #71392566, 0 2px 6px #7139250c;
  --display-font: var(--batang-text), Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 24rem 18rem at 4% 13rem, #e0bd9a91, transparent 96%),
    radial-gradient(ellipse 24rem 20rem at 98% 29rem, #d99a8e80, transparent 96%),
    radial-gradient(ellipse 22rem 19rem at 88% 52rem, #d2ddcc82, transparent 96%),
    linear-gradient(165deg, #fff8f5, var(--page) 66%);
}
header {
  background: linear-gradient(122deg, #fff8f4df, #f2ded5b8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--ink);
  padding-block: 1.3rem;
  box-shadow: var(--shadow);
}
header span { color: var(--ink); font-size: .9rem; font-weight: 600; }
h1 { font-family: var(--display-font); margin: .2rem 0 0; font-size: clamp(1.6rem, 7vw, 2.2rem); }
h2 { margin: 0 0 .8rem; font-size: 1.2rem; }
.shell { width: min(100%, 36rem); margin-inline: auto; padding-inline: 1rem; }
main { padding-block: 1rem 2rem; }
.card { background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 1.35rem; padding: 1rem; margin-bottom: .8rem; box-shadow: var(--shadow); }
label { display: grid; gap: .25rem; margin-block: 0 .8rem; font-weight: 600; }
input, textarea, button { font: inherit; padding: .5rem .8rem; min-height: 2.75rem; border-radius: .85rem; }
input, textarea { width: 100%; color: inherit; background: var(--surface); border: 1px solid #bc9082; }
textarea { resize: vertical; }
button { background: var(--accent); color: var(--page); border: 1px solid var(--accent); border-radius: 99rem; cursor: pointer; }
.secondary { background: var(--surface); color: var(--accent); }
a { color: var(--accent); }
.hint, small { color: var(--muted); }
.notice { border-left: 3px solid var(--focus); padding-left: .75rem; }
.student { padding-block: .65rem; display: flex; justify-content: space-between; gap: .4rem .8rem; flex-wrap: wrap; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.student small { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; }
.card > form + form { margin-top: .7rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.teacher-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 .8rem; }
.teacher-links a { display: inline-flex; min-height: 2.75rem; align-items: center; font-weight: 600; }
select, .button-link { font: inherit; min-height: 2.75rem; padding: .5rem .8rem; border-radius: .85rem; }
select { width: 100%; background: var(--surface); color: var(--ink); border: 1px solid #bc9082; }
.button-link { display: inline-flex; align-items: center; background: var(--accent); color: var(--page); border-radius: 99rem; text-decoration: none; }
.button-link.delete-link { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
.editor-image { display: block; max-width: 100%; max-height: 25rem; margin-block: .2rem .85rem; object-fit: contain; border-radius: .45rem; }
.editor-essay { line-height: 1.75; }
button:disabled { opacity: .65; cursor: wait; }
@media (max-width: 40rem) {
  header { margin: .75rem 1rem 0; padding-block: 1.05rem; border: 1px solid var(--line); border-radius: 1.65rem; }
}

.account-grid > *, .editor-content > * { min-width: 0; }
@media (min-width: 48rem) {
  .teacher-page .shell { width: min(100%, 69rem); padding-inline: clamp(1rem, 4vw, 2rem); }
  .account-grid, .editor-content-with-image { display: grid; align-items: start; gap: 1rem; }
  .account-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
  .editor-content-with-image { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-content-with-image .editor-image { height: auto; }
}
